Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sound when pv enters alarm state #59

Merged
merged 24 commits into from
Nov 21, 2023

Conversation

nstelter-slac
Copy link
Contributor

@nstelter-slac nstelter-slac commented Sep 13, 2023

use print ('\a') to produce cross-platform sound when any alarm enters active-alarm state

also add option for short-hand cmd line args (-a and --annunciate as options)

@nstelter-slac
Copy link
Contributor Author

nstelter-slac commented Oct 18, 2023

to try feature:
on dev-rhel7 machine:
-slam --topics LCLS --bootstrap-servers 172.24.5.224:9094 -a
-in left-hand tree menu, click on "LI24->SBI->SBI:LI24:1:SBI_ACC_NS" and check "Annunciate" and then "Ok"
-since this alarm continually toggles in/out of active-alarm state atm, you should hear a "beep" noise play as the alarm toggles

(note: beep will not play if you have "Terminal Bell" disabled in the terminal that launched slam (or possibly if other "system sounds" settings are disabled))

Nolan Stelter added 20 commits November 13, 2023 15:53
…ir color updated correctly when enabled/disabled
also add:
-add option to use shorthand cmd line args
-make annunciate checkbox say "Annunciate (disabled)" to avoid
confusion when annunciate disabled from cmd line
Copy link
Collaborator

@jbellister-slac jbellister-slac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and like discussed can follow up with a choice of different sounds later if needed, thanks!

@@ -61,6 +61,7 @@ def __init__(
topic: str,
table_type: AlarmTableType,
plot_slot: Callable,
annunciate: bool = False,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not currently used for tables but maybe could be useful in the future

Comment on lines -11 to +22
parser.add_argument("--topics", help="Comma separated list of kafka alarm topics to listen to")
parser.add_argument("-t", "--topics", help="Comma separated list of kafka alarm topics to listen to")
parser.add_argument(
"-b",
"--bootstrap-servers",
default="localhost:9092",
help="Comma separated list of urls for one or more kafka boostrap servers",
)
parser.add_argument("--user-permissions", default="admin", help="One of read-only, operator, admin")
parser.add_argument("--log", default="warning", help="Logging level. debug, info, warning, error, critical")
parser.add_argument("-u", "--user-permissions", default="admin", help="One of read-only, operator, admin")
parser.add_argument("-l", "--log", default="warning", help="Logging level. debug, info, warning, error, critical")
parser.add_argument(
"-a", "--annunciate", action="store_true", help="Enable beep from alarms that have annunciate setting enabled"
) # default=False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the easier command line options

@jbellister-slac jbellister-slac merged commit 3d7d3c1 into slaclab:main Nov 21, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants